/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_GARAGEDOOROPENCOMMAND_H
#define DESIGNPATTERN_GARAGEDOOROPENCOMMAND_H

#include "../Command.h"
#include "../../Pojo/GarageDoor.h"

namespace CommandSR {

    class GarageDoorOpenCommand : public CommandSR::Command {
    public:
        void execute() override {
            garageDoor.up();
        }

        explicit GarageDoorOpenCommand(const GarageDoor &garageDoor) : garageDoor(garageDoor) {}

    private:
        GarageDoor garageDoor;
    };

} // CommandSR

#endif //DESIGNPATTERN_GARAGEDOOROPENCOMMAND_H
